package util;

import domain.ListNode;

/**
 * @author: leiwenkang
 * @date: 2020/7/9
 * @time: 18:38
 */
public class ListNodeUtil {

    public static void printListNode(ListNode head) {
        if (head == null) {
            return;
        }

        ListNode p = head;
        while (p != null) {
            System.out.print(p.val);
            System.out.print(" ");
            p = p.next;
        }
    }
}
